import formBuilder from "@/comps/form/formBuilder";
import apiBuyer from "../../BuyerCategory/js/api";

export default {
    main:function () {
        let fb = formBuilder()
        fb.setLabelWidth(100)

        fb.addText("name").setLabel("名称").setSpan(6)
        fb.addText("short").setLabel("缩写").setSpan(3)
        fb.addCascade("catId").setLabel("分类").setSpan(3).setApi(apiBuyer.urlTree)

        fb.addText("contact").setLabel("联系方式").setSpan(3).setMaxLength(11)
        fb.addText("address").setLabel("地址").setSpan(9)

        fb.addText("info").setLabel("简介").setSpan(12).setMulti(true).setRows(5)
        fb.addText("note").setLabel("备注").setSpan(12).setMulti(true).setRows(5)

        fb.addArt("detail").setLabel("详细").setSpan(12)

        fb.addFiles("cover").setLabel("封面").setSpan(12)
            .setIsPic().setAcceptPic()
        fb.addFiles("assets").setLabel("附件").setSpan(12)
            .setIsFile().setAcceptAny().setIsMultiple()


        return fb
    },
    other:function () {
        let fb = formBuilder()
        fb.setLabelWidth(100).setLabelPosition("right")

        return fb
    }
}